package org.ims.inv.service.flow.impl;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.ims.inv.dao.flow.DAOFlowConfer;
import org.ims.inv.model.flow.ModelFlowTemplate;
import org.ims.inv.model.flow.confer.ModelFlowConfer;
import org.ims.inv.service.flow.ServiceFlowConfer;

import cn.trymore.core.service.impl.ServiceGenericImpl;

/**
 * Service: 会议审批
 * 
 * @author Jeccy.Zhao
 *
 */
public class ServiceFlowConferImpl
extends ServiceGenericImpl<ModelFlowConfer> implements ServiceFlowConfer
{
	
	/**
	 * Repository of flow template
	 */
	private DAOFlowConfer daoFlowConfer;
	
	public ServiceFlowConferImpl(DAOFlowConfer dao)
	{
		super(dao);
		
		this.daoFlowConfer = dao;
	}
	
	/*
	 * (non-Javadoc)
	 * @see cn.trymore.core.service.impl.ServiceGenericImpl#getCriterias(cn.trymore.core.model.ModelBase)
	 */
	@Override
	protected DetachedCriteria getCriterias(ModelFlowConfer domain)
	{
		DetachedCriteria criteria = DetachedCriteria.forClass(ModelFlowTemplate.class);
		criteria.addOrder(Order.asc("id"));
		return criteria;
	}

	public void setDaoFlowConfer(DAOFlowConfer daoFlowConfer)
	{
		this.daoFlowConfer = daoFlowConfer;
	}

	public DAOFlowConfer getDaoFlowConfer()
	{
		return daoFlowConfer;
	}
	
}
